Sunday, October 30, 2005

scrolling blogroll

Update: I made an easier-to-implement version of the scrolling blogroll and posted the code here. This should work for any type of blogging software or any website, and works in IE6, Firefox, and Opera.

Well, that's finally done. Took me long enough.

I'd been searching for the last several days for a way to make my various blogrolls take up less space. I wanted to move them to the right hand sidebar so that I could eventually include some ads on both sidebars, but I didn't want them to start running into the cartoons at the bottom of the page. So, I had to put them into scrolling boxes.

I liked the way that Angry in the Great White North did his blogrolls, but I couldn't see how he did it, as his style sheet is separate from his blog. However, with a little searching through his source, I managed to find the URL for his style sheet and then was able to see how he did his scrolling blogrolls.

His was the only blog I had seen that did blogrolls in this way. There was surprisingly little on the net in the way of documentation to do this technique. So, if anyone else wants to do the same thing with their blogrolls, they are going to run into the same problems that I did. Therefore, I decided to post the necessary code here.

First, in between the style and /style tags in your blog template, include the following lines:



In the above code, the "scrollbar-etc" parts determine the colour scheme of the scrollbars: this only works in Internet Explorer. If you directly copy those codes into your own blog, you will see (in IE) blue sliders and white background. Adjust the hexadecimal numbers that follow to match to your own blog's colour scheme (colour codes can be found here). And of course, adjust the height and width parameters to suit your own blog as well.

Then, in the sidebar section of the body of your blog template, include these lines of code:



I hope to see more of this technique used by other blogs; some of those blogrolls are huge, and being able to scroll through them would be very nice; rather than having these incredibly lengthy lists that extend well beyond the bottom of blog entries.

Technorati Tags:

11 comments:

AWGB said...

Cool!

Ed said...

Yeah Brian, your sidebar is pretty screwed up right now. I notice some similarities to problems that Aizlynne was having with her blog a few months ago too, with various sidebar entries shifting further and further to the right.

If you have no luck fixing it over the next few days, then email your template (as an attachment, not within the body of the email; yahoo mail tends to want to interpret the html code) to me and I'll see what I can do to fix it.

Ed said...

Whoops. Sorry Blair. I'm going senile I guess; I actually meant to type Blair but typed Brian instead. Silly me.

Or maybe the mad Cow disease is finally kicking in.

Richard said...

It worked amazingly well. Thanks amigo!

Zorpheous said...

Thanks for the info, I have been looking into doing this myself. Gotta get the blog looking more purdy for the Christmas Season and Elections ;-)

Anonymous said...

Aww... I tried this out with my new blog template and it didn't work. Sucks to be me...

trustonlymulder said...

RobotGuy and Ed. Thanks for the suggestion (Ed) and the technical know how (RobotGuy).

I just implemented this in less than 60 seconds.

Thank you.

trustonlymulder said...

Added question to ponder.

Is there anyway using the CSS or javascript to have a new target window appear? BloggingTories has their global blogroll target set to _self or none at all which flips the existing blog.

Maybe most prefer it this way, but I constantly have my website open to review text, correct typos, layout, etc. and use the blogroll for surfing so prefer to keep my main window locked on my site.

I know , I know, I'm just being picky. LOL

Ed said...

TrustOnlyMulder:
(1) RobotGuy and Ed are one and the same person.
(2) You're welcome.
(3) I'm sure there is a way to set it up so that all links open in a new window...

HOWEVER

I was looking to do something like this myself, but the more I read about it, the more I realized how much people hate it when a new window opens every time they click on something. If you are just doing it for yourself, then you are better off right-clicking on the link in your blog and then selecting "Open in a new window" from the pop-up menu.

Marvel said...

Ok, I'll be giving it a try. I used Mozilla to view your blog and everything looks fine. Thanks for sharing Ed!

Shmooreport said...

It took me days going nowhere with this blogging rolls until Richard from antiPC referred me to your site and 1 hour later I had scrolling rolls for my blogrolling. YiHaaaaaaaaaaaaaw. CooEL